<h1>Editing story</h1>

<% form_for(@story) do |f| %>
  <%= f.error_messages %>

  <p>
    <%= f.label :title %><br />
    <%= f.text_field :title %>
  </p>
  <p>
    <%= f.label :text %><br />
    <%= f.text_area :text %>
  </p>
  <p>
    <%= f.label :weight %><br />
    <%= f.text_field :weight %>
  </p>
  <p>
    <%= f.label :sprint_id %><br />
    <%= select_from_array(:story, :sprint_id, @all_sprints) %>
  </p>
  <p>
    <%= f.label :user_id %><br />
    <%= select_from_array(:story, :user_id, @all_users) %>
  </p>
  <p>
    <%= f.label :status %><br />
    <%= select_from_array(:story, :status, @story_statuses) %>
  </p>
  <p>
    <%= f.submit "Update" %>
  </p>
<% end %>

<%= link_to 'Show', @story %> |
<%= link_to 'Back', stories_path %>
